﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows;
using ChineseChess.Game.Rules;
using System.Windows.Shapes;

namespace ChineseChess.Game.Pieces
{
    [Serializable]
    public class JuPiece : Piece, ICloneable
    {
        private int type;
        private int xgap;
        private int ygap;
        /// <summary>
        /// 1为红子，2为黑子
        /// </summary>
        /// <param name="type"></param>
        public JuPiece(int type, int xgap, int ygap) : base(type, xgap, ygap)
        {
            this.type = type;
            this.xgap = xgap;
            this.ygap = ygap;
            this.Name = ChessName.车;
            this.rule = new JuRule();
            if (type == 1)
            {
                this.rule.IsDown = true;
            }
            else if (type == 2)
            {
                this.rule.IsDown = false;
            }
        }
        public List<Point> getNextPos(Piece pie)
        {
            return new List<Point>();
        }
        public new object Clone()
        {
            return new Piece(type, xgap, ygap) as object;//深复制  
        }
    }
}
